package day0318.math;

import java.util.Random;

/**
 * @Author Stringzhua
 * @Date 2024/3/19 10:03
 * description:伪随机数
 */
public class Math_03 {
    public static void main(String[] args) {
        //Radom是一个伪随机数,如果种子一样,则伪随机的序列相同
        Random r1 = new Random(10);//seed 伪随机数种子
        Random r2 = new Random(10);

        for (int i = 0; i < 10; i++) {
            System.out.print(r1.nextInt(20) + " ");//bound 取值范围0~20
        }
        System.out.println();
        for (int i = 0; i < 10; i++) {
            System.out.print(r1.nextInt(20) + " ");
        }
    }
}
